package com.owen.pojo;

import java.io.Serializable;
import java.util.Date;

/**
 * 商品实体类
 */
public class Commodity implements Serializable {

    // 商品id
    private Long id;

    // 商品名
    private String name;

    // 单价
    private Integer price;

    // 库存
    private Long stock;

    // 创建时间
    private Date createTime;

    public Commodity() {
    }

    public Commodity(Long id, String name, Integer price, Long stock, Date createTime) {
        this.id = id;
        this.name = name;
        this.price = price;
        this.stock = stock;
        this.createTime = createTime;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    public Long getStock() {
        return stock;
    }

    public void setStock(Long stock) {
        this.stock = stock;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "Commodity{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", price=" + price +
                ", stock=" + stock +
                ", createTime=" + createTime +
                '}';
    }
}
